#!/bin/sh

case "$(uname -s)" in
	CYGWIN*|MINGW*)
			npm install -g grunt-cli && npm install && grunt deploy-build
		;;
	*)
			if [ $(id -u) != "0" ];
				then
					npm install -g grunt-cli && npm install && grunt deploy-build
				else
					# Allows Linux and OSX users to run script/setup without the need for sudo
					sudo npm install -g grunt-cli
					sudo -u $(logname) npm install
					sudo grunt deploy-build
			fi
		;;
esac
